
using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
 // ERROR: Not supported in C#: OptionDeclaration
namespace NCS_CS
{
	internal partial class frmLine : System.Windows.Forms.Form
	{

		private void Command11_Click(System.Object eventSender, System.EventArgs eventArgs)
		{
			Command11.Enabled = false;
			//'
			double l = 0;
			double s = 0;
			double e = 0;
			double[] la = null;
			double[] se = null;
			int n = 0;
			n = (int)Conversion.Val(Text9.Text);
			if (n < 1 | n > 100)
				n = 10;
			la = new double[n + 1];
			se = new double[n + 1];
			int c = 0;
			s = Conversion.Val(Text6.Text);
			e = Conversion.Val(Text7.Text);
			double st = 0;
			st = (e - s) / n;
			Text8.Text = "";
			for (l = s; l <= e; l += st) {
				//FrmMethod.Text4.Text = CStr(l)
				ModMain.cxishu.LINExishu = l;
				//FrmMethod.Command3_Click(Nothing, New System.EventArgs()) ' enable text4 new value valid
				//Me.calcXishu
				//   Me.checkUpdate
				//Command10_Click recalc area
				ModMain.getFrmMethod().recalcArea();
				ModMain.getFrmMethod().calcXishu();
				//Command3_Click
                Text8.Text = Text8.Text + Convert.ToString(l) + "\0x9" + ModMain.getFrmMethod().txtstderr.Text + "\r\n";
				ModMain.setDynaArr(ref la, c, l);
				ModMain.setDynaArr(ref se, c, Conversion.Val(ModMain.getFrmMethod().txtstderr.Text));
				c = c + 1;
			}
			ModMain.getFrmMethod().mcurve1.setLineCount(1);
			ModMain.getFrmMethod().mcurve1.setshowpoint(true);
			ModMain.getFrmMethod().mcurve1.setxyDw( "",  "");
			ModMain.getFrmMethod().mcurve1.setArrV( ref la,  ref se, c, 0);
			ModMain.getFrmMethod().mcurve1.fit();
			Command11.Enabled = true;
		}

		private void frmLine_Load(System.Object eventSender, System.EventArgs eventArgs)
		{
			//UPGRADE_ISSUE: Global method LoadResPicture was not upgraded. Click for more: 'ms-help://MS.VSExpressCC.v80/dv_commoner/local/redirect.htm?keyword="6B85A2A7-FE9F-4FBE-AA0C-CF11AC86A305"'
			//Me.Icon = VB6.LoadResPicture("ncscs", VB6.LoadResConstants.ResIcon)
		}

		private void frmLine_FormClosed(System.Object eventSender, System.Windows.Forms.FormClosedEventArgs eventArgs)
		{
			ModMain.getFrmMethod().showCurrentCurve();
		}


	}
}
